-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated config loader to accept absolute paths to config files #3118
Conversation
lib/hexo/multi_config_path.js
Outdated
let configPath = defaultPath; | ||
|
||
// check for absolute config file | ||
if (pathFn.isAbsolute(configPaths)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be simplified to
configPath = pathFn.isAbsolute(configPaths) ? configPaths ? pathFn.resolve(base, configPaths);
then we can check fs.existsSync
in a single branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice add. Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JLHwung do I need to implement these changes on my branch? Or can you do it as a collaborator directly via GitHub?
@JLHwung I implemented your requested changes. Let me know if there is anything else. |
…s#3118) * updated config loader to accept absolute paths to config files * fixes for coveralls and codeclimate * refactored isAbsolute() check
Update to support absolute paths to config files.
Commit checklist: